//
//  TMShow_batch.swift
//  GZWeibo007
//
//  Created by uncle-R on 15/12/26.
//  Copyright © 2015年 Apple. All rights reserved.
//

import UIKit

class TMShow_batch: NSObject {
    
    ///转发数
    var reposts_count :Int = 0
    ///评论数
    var comments_count :Int = 0
    ///表态数
    var attitudes_count :Int = 0
    
    init(dict:[String : AnyObject]) {
        
        super.init()
        
        setValuesForKeysWithDictionary(dict)
        
    }
    override func setValue(value: AnyObject?, forUndefinedKey key: String) {
        
    }
    
  class  func loadShow_batch(idstr: Int,finsh:(batchs:[TMShow_batch]) -> ())
  {
        CZNetworkTool.sharedInstance.loadcount(idstr) { (result, error) -> () in
            if result == nil || error != nil{
                ///
                print("获取数据失败")
                return
            }
            
            
             var batchs = [TMShow_batch]()
            
             if let array = result?["statuses"] as? [[String: AnyObject]]{
            
                for dict in array{
                    let batch = TMShow_batch(dict: dict)
                    batchs.append(batch)
                }
                finsh(batchs: batchs)
            
        }
        
        
    }
 
    

    }}
